package com.example.newland.myapplication;

import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;

public class Main2Activity extends AppCompatActivity {

    private String TAG="Main2Activity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        handler.postDelayed(r,1000);

    }
 private Handler handler =new  Handler();
    private Runnable r= new Runnable() {
        @Override
        public void run() {
            Log.d(TAG, "run: ");

            if(MainActivity.ff==1){
                MainActivity.ff=0;

                Log.d(TAG, "aa="+MainActivity.aa+
                        "bb="+MainActivity.bb+"" +
                        "cc="+MainActivity.cc);
            }

            handler.postDelayed(r,1000);
        }
    };
}
